package com.easylinkin.linkappapi.roster.dto;

/**
 * 人员类型枚举
 */
public enum RosterTypeEnum {
    MANAGER("0","管理人员"),
    CONTRACT_WORKERS("1","劳务人员"),
    PROTECTIVE_OFFICER("2","防护员"),
    SPECIAL_OPERATION("3","特种作业人员");

    private String value;
    private String name;

    private RosterTypeEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }
    public  RosterTypeEnum findByKey(String key){
        RosterTypeEnum[] values = RosterTypeEnum.values();
        for (RosterTypeEnum value_e:values){
            if (key.equals(value_e.getValue())){
                return value_e;
            }
        }
        return null;
    }

}
